package m2.service;

import m2.port.PortFourni;

public class ServiceFourni extends Service {
	protected  PortFourni portFourni;
	
	public ServiceFourni(String name) {
		super(name);
	}

	@Override
	public void update(Object o, Object arg) {
		System.out.println(name+ " "+ arg);
		notifyObservers(arg);
		
	}

	public PortFourni getPortFourni() {
		return portFourni;
	}

	public void setPortFourni(PortFourni portFourni) {
		deleteObserver(portFourni);
		this.portFourni = portFourni;
		addObserver(this.portFourni);
	}
	
	public void activer(Object o){
		System.out.println(name + " "+ o );
		notifyObservers(o);
	}
}
